package wiz.client.activities.finishedgame;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class FinishedGamePlace extends Place {

	private String fGameStateToken;

	public FinishedGamePlace(String gameStateToken) {
		if(gameStateToken == null){
			throw new IllegalStateException();
		}
		fGameStateToken = gameStateToken;
	}
	
	public String getGameStateToken() {
		return fGameStateToken;
	}

	
	public static class Tokenizer implements PlaceTokenizer<FinishedGamePlace> {

		@Override
		public FinishedGamePlace getPlace(String token) {
			return new FinishedGamePlace(token);
		}

		@Override
		public String getToken(FinishedGamePlace place) {
			return place.fGameStateToken;
		}

	}


}
